﻿using System.Collections.Generic;
using System.IO;
using log4net;

namespace Framework.Core.Dependency.Adapter
{
    internal class DirectoryReader : IDirectoryReader
    {
        private static readonly ILog Logger = LogManager.GetLogger(typeof(DirectoryReader));

        public IEnumerable<string> GetFiles(string dir, string pattern = "*.*")
        {
            Logger.InfoFormat("Getting files from {0} directory", dir);
            return Directory.GetFiles(dir, pattern, SearchOption.AllDirectories);
        }
    }
}